package com.hospital.doctor.controller;

import com.hospital.doctor.pojo.ListPrescription;
import com.hospital.doctor.service.ListPrescriptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author QIUYANG
 * @title: ListPrescriptionController
 * @description: TODO
 * @date 2021/5/2618:34
 */
@RestController
@RequestMapping("/listprescription")
@CrossOrigin
public class ListPrescriptionController {

    @Autowired
    private ListPrescriptionService listPrescriptionService;


    @RequestMapping("/select/{pId}")
    public Map<String,Object> select(@PathVariable("pId") int pId){
        Map<String,Object> map = new HashMap<>();
        map.put("msg",listPrescriptionService.select(pId));
        return map;
    }


}
